package com.marktotop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.marktotop.entity.business.Supplier;
import com.marktotop.vo.business.VaccineSupplierVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author MarkToTop
 * @since 2021-07-12
 */
public interface SupplierMapper extends BaseMapper<Supplier> {

    /**
     * 分页，模糊查询供应商列表
     *
     * @param page
     * @param supplier
     * @return
     */
    IPage<Supplier> getSupplierByPage(Page<Supplier> page, @Param("supplier") Supplier supplier);


    /**
     * 获取某个供应商对象，带联系人信息
     *
     * @param id
     * @return
     */
    Supplier selectSupplierById(Long id);


    /**
     * 获取所有疫苗供应商列表，供疫苗登记使用
     *
     * @return
     */
    List<VaccineSupplierVO> getAllSupplierForVaccine();

}
